package rest;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class StudentServiceImpl implements StudentService {
    @Override
    public Student queryStudent(long id) {
        Student student = new Student();
        student.setId(100000l);
        student.setName("张三");
        student.setBirthday(new Date());
        return student;
    }

    @Override
    public List<Student> queryStudentList(String name)  {
        Student student1 = new Student();
        student1.setId(100000l);
        student1.setName("李四："+name);
        student1.setBirthday(new Date());

        Student student2 = new Student();
        student2.setId(100000l);
        student2.setName("张三："+name);
        student2.setBirthday(new Date());

        List<Student> list = new ArrayList<Student>();
        list.add(student1);
        list.add(student2);
        return list;
    }
}
